<%-- 
    Document   : login
    Created on : 23/03/2011, 16:15:17
    Author     : cristiane
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Login</title>
    </head>
    <body background="imagens/LoginBackground.gif">
        <form action="/Projeto1/ImobiliariaServlet?cmd=autenticarUsuario" method="post">
        <table style="text-align: left; width: 50%; position: absolute; top: 50%; left: 50%; margin-top: -100px; margin-left: -280px;" align="center" border="0" cellspacing="2" cellpadding="2" bgcolor="#CAE1FF">
            <tr>
                <td style="vertical-align: top; text-align: right">
                    Usu&aacute;rio:
                </td>
                <td style="vertical-align: top;">
                    <input type="text" name="usuario">
                </td>
            </tr>
            <tr>
                <td style="vertical-align: top; text-align: right">
                    Senha:
                </td>
                <td style="vertical-align: top">
                    <input type="password" name="senha"
                </td>
            </tr>
            <tr><td style="vertical-align: top; text-align: right;">
                    <input type="submit" name="logar" value="Entrar">
                </td>
                <td style="vertical-align: top;">
                    <input type="button" value="Cancelar" name="cancelar" onClick="history.go(-1)"/>
                </td>
            </tr>
<% String line = "<tr><td colspan=\"2\"><br><br></td></tr>" +
        "<tr><td style=\"text-align: center\" colspan=\"2\" rowspan=\"1\">";
String msgErro = (String) request.getAttribute("msgErro");

if(msgErro != null && !msgErro.equals("")){
    line += "<font color=\"red\">" + msgErro + "</font></td></tr>";
    out.println(line);
    }
%>

        </table>
</form>
    </body>
</html>
